﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<luck.Models.luckCompany>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
	<title>List Company</title>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>List Company</h2>
    <table cellspacing="0" cellpadding="2" border="0" id="Table_List">
    <tbody>
        <tr>
            <td class="col1">Từ khóa</td>
            <td class="col2">
                <form action="/ManageCompany/Search" method="post" >
                    <input type="text" name="key" id="key" />
                    <input id="search" type="submit" value="Search" />
                </form>
            </td>
            <td class="col3">Tổng số công ty: </td>
        </tr>
        <tr>
            <td colspan="3">
                <!-- Begin Danh sach -->
			    <table cellspacing="0" cellpadding="2" border="0" class="List" id="myTable2">
                    <tbody>
                        <tr id="myTable_title">
	                        <td id="col1">Tên Công Ty</td>
                	        <td id="col2">Phone</td>
	                        <td id="col3">Email</td>
	                        <td id="col4">Image</td>
	                        <td id="col5">Chức năng</td>
                        </tr>
                        <% foreach (var item in Model) { %>
                        <tr>
	                        <td id="Td1"><%= Html.ActionLink(item.CompanyName,"Details", new { id = item.ID}) %></td>
	                        <td id="Td2"><%= Html.Encode(item.CompanyPhone) %></td>
	                        <td id="Td3"><%= Html.Encode(item.CompanyEmail) %></td>
	                        <td id="Td4"><%= Html.Encode(item.CompanyImage) %></td>
	                        <td id="Td5">
	                            <%= Html.ActionLink("Edit", "Edit", new { id=item.ID }) %> |
                                <a href="/ManageCompany/Delete/<%= item.ID %>" onclick = "return confirmDelete('Company')">Delete</a>
                            </td>
            	        </tr>
                        <%} %>
                        
                    </tbody>
                </table>  
		        <!-- End Danh sach -->
		        <table cellspacing="0" cellpadding="2" border="0" id="Pager">
	                <tbody>
	                    <tr>
		                    <td class="ColPager"><!-- pager -->[«][‹][1][2][›][»]</td>
	                    </tr>
                    </tbody>
                </table>
            </td>
        </tr>
    </tbody>
    </table>
    <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>